#ifndef EYERWASMINDEXEDDB_OPENEVENT_HPP
#define EYERWASMINDEXEDDB_OPENEVENT_HPP

#include "EyerWASMCommon/EyerWASMEvent.hpp"

namespace Eyer
{
    class EyerWASMIndexedDB_OpenEvent : public EyerWASMEvent
    {
    public:
        EyerWASMIndexedDB_OpenEvent(const std::string & _dbName);

        virtual int Run() override;

        int EyerWASMIndexedDB_OpenEvent_Open_OnSucc(int key);
        int EyerWASMIndexedDB_OpenEvent_Open_OnFail();

        int GetIndexedDBKey();

    private:
        std::string dbName = "";
        int m_indexedDBKey = 0;
    };
}

#endif //EYERWASMINDEXEDDB_OPENEVENT_HPP
